#ifndef CHAT_H
#define CHAT_H

#include <QWidget>
#include <QListWidgetItem>

#include "qnchatmessage.h"
#include "mode.h"

namespace Ui {
class Chat;
}

class Chat : public QWidget
{
    Q_OBJECT

public:
    explicit Chat(QWidget *parent = nullptr, mode m=patient);
    ~Chat();

    void dealMessage(QNChatMessage *messageW, QListWidgetItem *item, QString text, QString time, QNChatMessage::User_Type type);
    void dealMessageTime(QString curMsgTime);

    void setCurrentMode(const mode &value);

protected:
    void resizeEvent(QResizeEvent *event);

private slots:
    void on_pushButton_send_clicked();

private:
    Ui::Chat *ui;
    mode currentMode;
};

#endif // CHAT_H
